<template>
  <el-dialog
    v-model="dialogVisible"
    width="500"
    center
    draggable
    align-center
    destroy-on-close
    @open="open"
    @close="close"
  >
    <el-result
      icon="success"
      title="提交成功"
      sub-title="您的商户开户申请已提交成功！"
    >
      <template #extra>
        <div>
          <p>受理订单号： 123146545679789789</p>
          <p>订单号已发送至您的手机，您可以使用该订单号查询审核状态。</p>
        </div>
      </template>
    </el-result>
    <template #footer>
      <div class="dialog-footer">
        <el-button type="primary" @click="submitNext"> 确定 </el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script lang="ts" setup>
import { ref, defineProps, defineEmits, computed } from "vue";
import { useRouter } from "vue-router";
import { message } from "@/utils/message";
const router = useRouter();
// 定义 props
const props = defineProps({
  visible: {
    type: Boolean,
    default: false
  }
});
// 定义 emits
const emit = defineEmits(["closeDialog"]);
const dialogVisible = computed({
  get() {
    return props.visible;
  },
  // setter
  set(newValue) {
    emit("closeDialog", newValue);
  }
});

const open = () => {};
const close = () => {};
const submitNext = () => {
  router.push("/application/qrcode");
};
</script>
